perm filename SQRT.POX[D,LES] blob
sn#185037 filedate 1975-11-03 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 \|\\⊂'445\⊂'1000001\M0NGR25\ Test of Square root macro.
C00004 ENDMK
C⊗;
\|\\⊂'445;\⊂'1000001;\M0NGR25;\; Test of Square root macro.
\∞sqrT[\+t\→t\\T\-t\/=2;\?sqrT;]\; subroutine used by SQRT.
\∞sqrt[\→T\¬=0;\→t\/=-2;\?sqrT;\-t]\; Square root of ac → ac. Uses t and T.
\;
\8till(macro)[\←y\-=1;\→y\-B\?⊗macro⊗;]\; Repeats macro until y=B.
\;
\8circle(X,Y,R,T)[\N Draws a circle centered at X,Y with radius R and
\N line thickness T. Uses registers B,I,T,t,W,x,y.
\←⊗R⊗\→y\-⊗T⊗\→I\-=1;\→B\N Initialize y coordinate, bottom of cap B,
\N and inner radius R.
\∞vector[\←⊗X⊗\+x\→T\←⊗Y⊗\+y\VT∀T∀W]\N Draw horizontal line.
\∞xcal[\*∀→T\←y\*y\¬T\*=100;\!sqrt;\/=10;]\N Compute x coordinate.
\∞cap[\←⊗R⊗\!xcal;\¬=0;\→x\*=-2;\→W\!vector;]\N Do cap element.
\∞left[\←y\/x\+x\→x\←⊗T⊗\*⊗R⊗\/x\→W\!vector;]\N Do left element
\!till(cap);\N Do whole cap.
\←⊗R⊗\¬⊗T⊗\→B\!till(left);\N Do left side.
\N]\;
\;
\!circle(=400;)(=400;)(=200;)(=4;);